"use client"
import React from 'react';
import { AppstoreOutlined, MailOutlined, SettingOutlined, HomeOutlined, ShopOutlined } from '@ant-design/icons';
import Menu_1 from './menu_1';

export interface shopList_ObjectType {
  id: number;
  title: string;
  Associated_customer: string;
  stage: string;
  records: string;
  price: string|number;
  key: number;
  day: string;
}
// 面包屑数据
export function Bread (url:string){
  let [a1,a2,a3]=url.split('/')
  let arr:any = []
  if(a2 === 'long'){
    arr=["",'孟巨龙','商机管理']
    a3==='bpp'&&arr.splice(2,1,'样式1')
  }else if(a2 === 'lsf'){
    arr=['','廖苏凡','订单管理']
    a3==='bpp'&&arr.splice(2,1,'我的')
  }else if(a2 === 'list'){
    arr=['','郭浩然','客户管理']
    a3==='bpp'&&arr.splice(2,1,'样式1')
  }else if(a2 === 'xyn'){
    arr=['','许雨诺','财务管理']
    a3==='xyn2'&&arr.splice(2,1,'管理')
    a3==='xyn3'&&arr.splice(2,1,'发票')
  }else if(a2 === 'zcy'){
    arr=['','邹聪祎','审批管理']
    a3==='bpp'&&arr.splice(2,1,"回款审批")
    a3==='cpp'&&arr.splice(2,1,"退款审批")
  }else{
    return [<HomeOutlined />,'首页']
  }
  arr.splice(0,1,<HomeOutlined />)
  return arr
}
export type shopList_ArrayType = shopList_ObjectType[]

// url数据
const long=[
  {
    key: '/app',
    icon: <MailOutlined />,
    label: '商机管理',
  },
  {
    key: '/bpp',
    icon: <AppstoreOutlined />,
    label: '样式1',
  }
]
const list=[
  {
    key: '/app',
    icon: <MailOutlined />,
    label: '客户管理',
  },
  {
    key: '/bpp',
    icon: <AppstoreOutlined />,
    label: '样式1',
  }
]
const xyn=[
  {
    key: '/xyn1',
    icon: <MailOutlined />,
    label: '财务管理',
  },
  {
    key: '/xyn2',
    icon: <AppstoreOutlined />,
    label: '管理',
  },
  {
    key:"/xyn3",
    icon: <SettingOutlined />,
    label: '发票', 
  }
]
const zcy=[
  {
    key: '/app',
    label: '审批管理',
  },
  {
    key: '/bpp',
    label: '回款审批',
  },
  {
    key: '/cpp',
    label: '退款审批',
  }
]
// lsf下面的文件
const lsf=[
  {
    key: '/all',
    label: '全部订单',
  },
  {
    key: '/bpp',
    label: '我的订单',
  },
  
]

export const menuData=[
  // 路由
  {
    label: "首页",
    key: "/home",
    children: <Menu_1 url="" items={[{key: 'home',
      icon: <MailOutlined />,label: '首页'}]} />
  },
  {
    label: "孟巨龙",
    key: "/long",
    children: <Menu_1 url="/long" items={long} />
  },
  {
    label: "廖苏凡",
    key: "/lsf",
    children: <Menu_1 url="/lsf" items={lsf} />
  },
  { 
    label: "郭浩然",
    key: "/list",
    children: <Menu_1 url="/list" items={list} />
  },{
    label: "许雨诺",
    key: "/xyn",
    children: <Menu_1 url="/xyn" items={xyn} />
  },
  {
    label: "邹聪祎",
    key: "/zcy",
    children: <Menu_1 url="/zcy" items={zcy} />
  },
]